<template>
  <div>
    <Hearder />
    <el-card>
      <el-row :gutter="20">
        <el-col :span="10"
          ><el-input placeholder="请输入内容" v-model="from.query">
            <el-button slot="append" icon="el-icon-search"></el-button>
          </el-input>
        </el-col>
        <el-col :span="5">
          <el-button type="primary">搜索</el-button>
        </el-col>
      </el-row>
      <!-- <el-table :data="goodList">
        <el-table-column prop="goodList.goods_name" label="商品名称">
        </el-table-column>
        <el-table-column prop="name" label="商品价格">
        </el-table-column>
        <el-table-column prop="address" label="商品重量">
         </el-table-column>
          <el-table-column prop="address" label="创建时间">
         </el-table-column>
          <el-table-column prop="address" label="操作">
         </el-table-column>
      </el-table> -->
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      from:{
        query:"",
        pagenum:1,
        pagesize:5
      },
      goodList:[]
    };
  },
  mounted(){
    this.getList()
  },
  methods:{
   async getList(){
        const {data:res}=await this.$http.get('goods',{params:this.from}).catch(err=>err)
        this.goodList=res.data.goods
        console.log(res.data.goods);

    
    }
  }
};
</script>

<style scoped></style>
